// ignore_for_file: non_constant_identifier_names
// ignore_for_file: camel_case_types
// ignore_for_file: prefer_single_quotes

import 'package:factoryside/bean/acc_detail_entity.dart';
import 'package:factoryside/bean/acc_order.dart';
import 'package:factoryside/bean/add_order_entity.dart';
import 'package:factoryside/bean/addr_entity.dart';
import 'package:factoryside/bean/area_list_entity.dart';
import 'package:factoryside/bean/audit_acc_entity.dart';
import 'package:factoryside/bean/bill_sec_entity.dart';
// This file is automatically generated. DO NOT EDIT, all your changes would be lost.
import 'package:factoryside/bean/city_list_entity.dart';
import 'package:factoryside/bean/count_entity.dart';
import 'package:factoryside/bean/distinguish_entity.dart';
import 'package:factoryside/bean/district_list_entity.dart';
import 'package:factoryside/bean/factory_address_entity.dart';
import 'package:factoryside/bean/factory_brand_entity.dart';
import 'package:factoryside/bean/factory_prod_entity.dart';
import 'package:factoryside/bean/fee_detail_entity.dart';
import 'package:factoryside/bean/fee_order_entity.dart';
import 'package:factoryside/bean/finance_entity.dart';
import 'package:factoryside/bean/finances_json_entity.dart';
import 'package:factoryside/bean/leave_msg_entity.dart';
import 'package:factoryside/bean/order_detail_entity.dart';
import 'package:factoryside/bean/order_list_entity.dart';
import 'package:factoryside/bean/order_record_entity.dart';
import 'package:factoryside/bean/part_entity.dart';
import 'package:factoryside/bean/policy_entity.dart';
import 'package:factoryside/bean/prod_category_entity.dart';
import 'package:factoryside/bean/prod_model_entity.dart';
import 'package:factoryside/bean/prod_specifications_entity.dart';
import 'package:factoryside/bean/province_list_entity.dart';
import 'package:factoryside/bean/recharge_record_entity.dart';
import 'package:factoryside/bean/statistics_entity.dart';
import 'package:factoryside/bean/userinfo_entity.dart';
import 'package:factoryside/bean/wx_pay_info_entity.dart';
import 'package:factoryside/generated/json/acc_detail_entity_helper.dart';
import 'package:factoryside/generated/json/acc_order_helper.dart';
import 'package:factoryside/generated/json/add_order_entity_helper.dart';
import 'package:factoryside/generated/json/addr_entity_helper.dart';
import 'package:factoryside/generated/json/area_list_entity_helper.dart';
import 'package:factoryside/generated/json/audit_acc_entity_helper.dart';
import 'package:factoryside/generated/json/bill_sec_entity_helper.dart';
import 'package:factoryside/generated/json/city_list_entity_helper.dart';
import 'package:factoryside/generated/json/count_entity_helper.dart';
import 'package:factoryside/generated/json/distinguish_entity_helper.dart';
import 'package:factoryside/generated/json/district_list_entity_helper.dart';
import 'package:factoryside/generated/json/factory_address_entity_helper.dart';
import 'package:factoryside/generated/json/factory_brand_entity_helper.dart';
import 'package:factoryside/generated/json/factory_prod_entity_helper.dart';
import 'package:factoryside/generated/json/fee_detail_entity_helper.dart';
import 'package:factoryside/generated/json/fee_order_entity_helper.dart';
import 'package:factoryside/generated/json/finance_entity_helper.dart';
import 'package:factoryside/generated/json/finances_json_entity_helper.dart';
import 'package:factoryside/generated/json/leave_msg_entity_helper.dart';
import 'package:factoryside/generated/json/order_detail_entity_helper.dart';
import 'package:factoryside/generated/json/order_list_entity_helper.dart';
import 'package:factoryside/generated/json/order_record_entity_helper.dart';
import 'package:factoryside/generated/json/part_entity_helper.dart';
import 'package:factoryside/generated/json/policy_entity_helper.dart';
import 'package:factoryside/generated/json/prod_category_entity_helper.dart';
import 'package:factoryside/generated/json/prod_model_entity_helper.dart';
import 'package:factoryside/generated/json/prod_specifications_entity_helper.dart';
import 'package:factoryside/generated/json/province_list_entity_helper.dart';
import 'package:factoryside/generated/json/recharge_record_entity_helper.dart';
import 'package:factoryside/generated/json/statistics_entity_helper.dart';
import 'package:factoryside/generated/json/userinfo_entity_helper.dart';
import 'package:factoryside/generated/json/wx_pay_info_entity_helper.dart';

class JsonConvert<T> {
	T fromJson(Map<String, dynamic> json) {
		return _getFromJson<T>(runtimeType, this, json);
	}

  Map<String, dynamic> toJson() {
		return _getToJson<T>(runtimeType, this);
  }

  static _getFromJson<T>(Type type, data, json) {
    switch (type) {
			case CityListEntity:
				return cityListEntityFromJson(data as CityListEntity, json) as T;
			case CityListData:
				return cityListDataFromJson(data as CityListData, json) as T;
			case CityListDataData:
				return cityListDataDataFromJson(data as CityListDataData, json) as T;
			case PolicyEntity:
				return policyEntityFromJson(data as PolicyEntity, json) as T;
			case PolicyData:
				return policyDataFromJson(data as PolicyData, json) as T;
			case ProdModelEntity:
				return prodModelEntityFromJson(data as ProdModelEntity, json) as T;
			case AreaListEntity:
				return areaListEntityFromJson(data as AreaListEntity, json) as T;
			case AreaListData:
				return areaListDataFromJson(data as AreaListData, json) as T;
			case AreaListDataData:
				return areaListDataDataFromJson(data as AreaListDataData, json) as T;
			case LeaveMsgEntity:
				return leaveMsgEntityFromJson(data as LeaveMsgEntity, json) as T;
			case LeaveMsgData:
				return leaveMsgDataFromJson(data as LeaveMsgData, json) as T;
			case LeaveMsgDataData:
				return leaveMsgDataDataFromJson(data as LeaveMsgDataData, json) as T;
			case OrderListEntity:
				return orderListEntityFromJson(data as OrderListEntity, json) as T;
			case OrderListOutputOrderAllRecordInfoDto:
				return orderListOutputOrderAllRecordInfoDtoFromJson(data as OrderListOutputOrderAllRecordInfoDto, json) as T;
			case OrderListProdct:
				return orderListProdctFromJson(data as OrderListProdct, json) as T;
			case OrderRecordEntity:
				return orderRecordEntityFromJson(data as OrderRecordEntity, json) as T;
			case OrderRecordLeavemessageimgList:
				return orderRecordLeavemessageimgListFromJson(data as OrderRecordLeavemessageimgList, json) as T;
			case AddOrderEntity:
				return addOrderEntityFromJson(data as AddOrderEntity, json) as T;
			case AddOrderProd:
				return addOrderProdFromJson(data as AddOrderProd, json) as T;
			case AddOrderProdsPartsVal:
				return addOrderProdsPartsValFromJson(data as AddOrderProdsPartsVal, json) as T;
			case RechargeRecordEntity:
				return rechargeRecordEntityFromJson(data as RechargeRecordEntity, json) as T;
			case StatisticsEntity:
				return statisticsEntityFromJson(data as StatisticsEntity, json) as T;
			case PartEntity:
				return partEntityFromJson(data as PartEntity, json) as T;
			case UserinfoEntity:
				return userinfoEntityFromJson(data as UserinfoEntity, json) as T;
			case UserinfoData:
				return userinfoDataFromJson(data as UserinfoData, json) as T;
			case UserinfoDataData:
				return userinfoDataDataFromJson(data as UserinfoDataData, json) as T;
			case ProvinceListEntity:
				return provinceListEntityFromJson(data as ProvinceListEntity, json) as T;
			case ProvinceListData:
				return provinceListDataFromJson(data as ProvinceListData, json) as T;
			case FinanceEntity:
				return financeEntityFromJson(data as FinanceEntity, json) as T;
			case OrderDetailEntity:
				return orderDetailEntityFromJson(data as OrderDetailEntity, json) as T;
			case OrderDetailOrderProductModel:
				return orderDetailOrderProductModelFromJson(data as OrderDetailOrderProductModel, json) as T;
			case OrderDetailMasterInfo:
				return orderDetailMasterInfoFromJson(data as OrderDetailMasterInfo, json) as T;
			case FactoryBrandEntity:
				return factoryBrandEntityFromJson(data as FactoryBrandEntity, json) as T;
			case WxPayInfoEntity:
				return wxPayInfoEntityFromJson(data as WxPayInfoEntity, json) as T;
			case WxPayInfoData:
				return wxPayInfoDataFromJson(data as WxPayInfoData, json) as T;
			case WxPayInfoDataItem2:
				return wxPayInfoDataItem2FromJson(data as WxPayInfoDataItem2, json) as T;
			case BillSecEntity:
				return billSecEntityFromJson(data as BillSecEntity, json) as T;
			case FeeOrderEntity:
				return feeOrderEntityFromJson(data as FeeOrderEntity, json) as T;
			case AccDetailEntity:
				return accDetailEntityFromJson(data as AccDetailEntity, json) as T;
			case AccDetailAccessoryDate:
				return accDetailAccessoryDateFromJson(data as AccDetailAccessoryDate, json) as T;
			case AccDetailAccessory:
				return accDetailAccessoryFromJson(data as AccDetailAccessory, json) as T;
			case AccDetailOrderProductList:
				return accDetailOrderProductListFromJson(data as AccDetailOrderProductList, json) as T;
			case AccDetailOrderProductListAccessoryData:
				return accDetailOrderProductListAccessoryDataFromJson(data as AccDetailOrderProductListAccessoryData, json) as T;
			case FeeDetailEntity:
				return feeDetailEntityFromJson(data as FeeDetailEntity, json) as T;
			case FeeDetailFee:
				return feeDetailFeeFromJson(data as FeeDetailFee, json) as T;
			case DistrictListEntity:
				return districtListEntityFromJson(data as DistrictListEntity, json) as T;
			case DistrictListData:
				return districtListDataFromJson(data as DistrictListData, json) as T;
			case DistrictListDataData:
				return districtListDataDataFromJson(data as DistrictListDataData, json) as T;
			case DistinguishEntity:
				return distinguishEntityFromJson(data as DistinguishEntity, json) as T;
			case FactoryProdEntity:
				return factoryProdEntityFromJson(data as FactoryProdEntity, json) as T;
			case AccOrderDataData:
				return accOrderDataDataFromJson(data as AccOrderDataData, json) as T;
			case CountEntity:
				return countEntityFromJson(data as CountEntity, json) as T;
			case FactoryAddressEntity:
				return factoryAddressEntityFromJson(data as FactoryAddressEntity, json) as T;
			case AddrEntity:
				return addrEntityFromJson(data as AddrEntity, json) as T;
			case AddrData:
				return addrDataFromJson(data as AddrData, json) as T;
			case FinancesJsonEntity:
				return financesJsonEntityFromJson(data as FinancesJsonEntity, json) as T;
			case AuditAccEntity:
				return auditAccEntityFromJson(data as AuditAccEntity, json) as T;
			case ProdSpecificationsEntity:
				return prodSpecificationsEntityFromJson(data as ProdSpecificationsEntity, json) as T;
			case ProdCategoryEntity:
				return prodCategoryEntityFromJson(data as ProdCategoryEntity, json) as T;    }
    return data as T;
  }

  static _getToJson<T>(Type type, data) {
		switch (type) {
			case CityListEntity:
				return cityListEntityToJson(data as CityListEntity);
			case CityListData:
				return cityListDataToJson(data as CityListData);
			case CityListDataData:
				return cityListDataDataToJson(data as CityListDataData);
			case PolicyEntity:
				return policyEntityToJson(data as PolicyEntity);
			case PolicyData:
				return policyDataToJson(data as PolicyData);
			case ProdModelEntity:
				return prodModelEntityToJson(data as ProdModelEntity);
			case AreaListEntity:
				return areaListEntityToJson(data as AreaListEntity);
			case AreaListData:
				return areaListDataToJson(data as AreaListData);
			case AreaListDataData:
				return areaListDataDataToJson(data as AreaListDataData);
			case LeaveMsgEntity:
				return leaveMsgEntityToJson(data as LeaveMsgEntity);
			case LeaveMsgData:
				return leaveMsgDataToJson(data as LeaveMsgData);
			case LeaveMsgDataData:
				return leaveMsgDataDataToJson(data as LeaveMsgDataData);
			case OrderListEntity:
				return orderListEntityToJson(data as OrderListEntity);
			case OrderListOutputOrderAllRecordInfoDto:
				return orderListOutputOrderAllRecordInfoDtoToJson(data as OrderListOutputOrderAllRecordInfoDto);
			case OrderListProdct:
				return orderListProdctToJson(data as OrderListProdct);
			case OrderRecordEntity:
				return orderRecordEntityToJson(data as OrderRecordEntity);
			case OrderRecordLeavemessageimgList:
				return orderRecordLeavemessageimgListToJson(data as OrderRecordLeavemessageimgList);
			case AddOrderEntity:
				return addOrderEntityToJson(data as AddOrderEntity);
			case AddOrderProd:
				return addOrderProdToJson(data as AddOrderProd);
			case AddOrderProdsPartsVal:
				return addOrderProdsPartsValToJson(data as AddOrderProdsPartsVal);
			case RechargeRecordEntity:
				return rechargeRecordEntityToJson(data as RechargeRecordEntity);
			case StatisticsEntity:
				return statisticsEntityToJson(data as StatisticsEntity);
			case PartEntity:
				return partEntityToJson(data as PartEntity);
			case UserinfoEntity:
				return userinfoEntityToJson(data as UserinfoEntity);
			case UserinfoData:
				return userinfoDataToJson(data as UserinfoData);
			case UserinfoDataData:
				return userinfoDataDataToJson(data as UserinfoDataData);
			case ProvinceListEntity:
				return provinceListEntityToJson(data as ProvinceListEntity);
			case ProvinceListData:
				return provinceListDataToJson(data as ProvinceListData);
			case FinanceEntity:
				return financeEntityToJson(data as FinanceEntity);
			case OrderDetailEntity:
				return orderDetailEntityToJson(data as OrderDetailEntity);
			case OrderDetailOrderProductModel:
				return orderDetailOrderProductModelToJson(data as OrderDetailOrderProductModel);
			case OrderDetailMasterInfo:
				return orderDetailMasterInfoToJson(data as OrderDetailMasterInfo);
			case FactoryBrandEntity:
				return factoryBrandEntityToJson(data as FactoryBrandEntity);
			case WxPayInfoEntity:
				return wxPayInfoEntityToJson(data as WxPayInfoEntity);
			case WxPayInfoData:
				return wxPayInfoDataToJson(data as WxPayInfoData);
			case WxPayInfoDataItem2:
				return wxPayInfoDataItem2ToJson(data as WxPayInfoDataItem2);
			case BillSecEntity:
				return billSecEntityToJson(data as BillSecEntity);
			case FeeOrderEntity:
				return feeOrderEntityToJson(data as FeeOrderEntity);
			case AccDetailEntity:
				return accDetailEntityToJson(data as AccDetailEntity);
			case AccDetailAccessoryDate:
				return accDetailAccessoryDateToJson(data as AccDetailAccessoryDate);
			case AccDetailAccessory:
				return accDetailAccessoryToJson(data as AccDetailAccessory);
			case AccDetailOrderProductList:
				return accDetailOrderProductListToJson(data as AccDetailOrderProductList);
			case AccDetailOrderProductListAccessoryData:
				return accDetailOrderProductListAccessoryDataToJson(data as AccDetailOrderProductListAccessoryData);
			case FeeDetailEntity:
				return feeDetailEntityToJson(data as FeeDetailEntity);
			case FeeDetailFee:
				return feeDetailFeeToJson(data as FeeDetailFee);
			case DistrictListEntity:
				return districtListEntityToJson(data as DistrictListEntity);
			case DistrictListData:
				return districtListDataToJson(data as DistrictListData);
			case DistrictListDataData:
				return districtListDataDataToJson(data as DistrictListDataData);
			case DistinguishEntity:
				return distinguishEntityToJson(data as DistinguishEntity);
			case FactoryProdEntity:
				return factoryProdEntityToJson(data as FactoryProdEntity);
			case AccOrderDataData:
				return accOrderDataDataToJson(data as AccOrderDataData);
			case CountEntity:
				return countEntityToJson(data as CountEntity);
			case FactoryAddressEntity:
				return factoryAddressEntityToJson(data as FactoryAddressEntity);
			case AddrEntity:
				return addrEntityToJson(data as AddrEntity);
			case AddrData:
				return addrDataToJson(data as AddrData);
			case FinancesJsonEntity:
				return financesJsonEntityToJson(data as FinancesJsonEntity);
			case AuditAccEntity:
				return auditAccEntityToJson(data as AuditAccEntity);
			case ProdSpecificationsEntity:
				return prodSpecificationsEntityToJson(data as ProdSpecificationsEntity);
			case ProdCategoryEntity:
				return prodCategoryEntityToJson(data as ProdCategoryEntity);
			}
			return data as T;
		}
  //Go back to a single instance by type
	static _fromJsonSingle<M>( json) {
		String type = M.toString();
		if(type == (CityListEntity).toString()){
			return CityListEntity().fromJson(json);
		}	else if(type == (CityListData).toString()){
			return CityListData().fromJson(json);
		}	else if(type == (CityListDataData).toString()){
			return CityListDataData().fromJson(json);
		}	else if(type == (PolicyEntity).toString()){
			return PolicyEntity().fromJson(json);
		}	else if(type == (PolicyData).toString()){
			return PolicyData().fromJson(json);
		}	else if(type == (ProdModelEntity).toString()){
			return ProdModelEntity().fromJson(json);
		}	else if(type == (AreaListEntity).toString()){
			return AreaListEntity().fromJson(json);
		}	else if(type == (AreaListData).toString()){
			return AreaListData().fromJson(json);
		}	else if(type == (AreaListDataData).toString()){
			return AreaListDataData().fromJson(json);
		}	else if(type == (LeaveMsgEntity).toString()){
			return LeaveMsgEntity().fromJson(json);
		}	else if(type == (LeaveMsgData).toString()){
			return LeaveMsgData().fromJson(json);
		}	else if(type == (LeaveMsgDataData).toString()){
			return LeaveMsgDataData().fromJson(json);
		}	else if(type == (OrderListEntity).toString()){
			return OrderListEntity().fromJson(json);
		}	else if(type == (OrderListOutputOrderAllRecordInfoDto).toString()){
			return OrderListOutputOrderAllRecordInfoDto().fromJson(json);
		}	else if(type == (OrderListProdct).toString()){
			return OrderListProdct().fromJson(json);
		}	else if(type == (OrderRecordEntity).toString()){
			return OrderRecordEntity().fromJson(json);
		}	else if(type == (OrderRecordLeavemessageimgList).toString()){
			return OrderRecordLeavemessageimgList().fromJson(json);
		}	else if(type == (AddOrderEntity).toString()){
			return AddOrderEntity().fromJson(json);
		}	else if(type == (AddOrderProd).toString()){
			return AddOrderProd().fromJson(json);
		}	else if(type == (AddOrderProdsPartsVal).toString()){
			return AddOrderProdsPartsVal().fromJson(json);
		}	else if(type == (RechargeRecordEntity).toString()){
			return RechargeRecordEntity().fromJson(json);
		}	else if(type == (StatisticsEntity).toString()){
			return StatisticsEntity().fromJson(json);
		}	else if(type == (PartEntity).toString()){
			return PartEntity().fromJson(json);
		}	else if(type == (UserinfoEntity).toString()){
			return UserinfoEntity().fromJson(json);
		}	else if(type == (UserinfoData).toString()){
			return UserinfoData().fromJson(json);
		}	else if(type == (UserinfoDataData).toString()){
			return UserinfoDataData().fromJson(json);
		}	else if(type == (ProvinceListEntity).toString()){
			return ProvinceListEntity().fromJson(json);
		}	else if(type == (ProvinceListData).toString()){
			return ProvinceListData().fromJson(json);
		}	else if(type == (FinanceEntity).toString()){
			return FinanceEntity().fromJson(json);
		}	else if(type == (OrderDetailEntity).toString()){
			return OrderDetailEntity().fromJson(json);
		}	else if(type == (OrderDetailOrderProductModel).toString()){
			return OrderDetailOrderProductModel().fromJson(json);
		}	else if(type == (OrderDetailMasterInfo).toString()){
			return OrderDetailMasterInfo().fromJson(json);
		}	else if(type == (FactoryBrandEntity).toString()){
			return FactoryBrandEntity().fromJson(json);
		}	else if(type == (WxPayInfoEntity).toString()){
			return WxPayInfoEntity().fromJson(json);
		}	else if(type == (WxPayInfoData).toString()){
			return WxPayInfoData().fromJson(json);
		}	else if(type == (WxPayInfoDataItem2).toString()){
			return WxPayInfoDataItem2().fromJson(json);
		}	else if(type == (BillSecEntity).toString()){
			return BillSecEntity().fromJson(json);
		}	else if(type == (FeeOrderEntity).toString()){
			return FeeOrderEntity().fromJson(json);
		}	else if(type == (AccDetailEntity).toString()){
			return AccDetailEntity().fromJson(json);
		}	else if(type == (AccDetailAccessoryDate).toString()){
			return AccDetailAccessoryDate().fromJson(json);
		}	else if(type == (AccDetailAccessory).toString()){
			return AccDetailAccessory().fromJson(json);
		}	else if(type == (AccDetailOrderProductList).toString()){
			return AccDetailOrderProductList().fromJson(json);
		}	else if(type == (AccDetailOrderProductListAccessoryData).toString()){
			return AccDetailOrderProductListAccessoryData().fromJson(json);
		}	else if(type == (FeeDetailEntity).toString()){
			return FeeDetailEntity().fromJson(json);
		}	else if(type == (FeeDetailFee).toString()){
			return FeeDetailFee().fromJson(json);
		}	else if(type == (DistrictListEntity).toString()){
			return DistrictListEntity().fromJson(json);
		}	else if(type == (DistrictListData).toString()){
			return DistrictListData().fromJson(json);
		}	else if(type == (DistrictListDataData).toString()){
			return DistrictListDataData().fromJson(json);
		}	else if(type == (DistinguishEntity).toString()){
			return DistinguishEntity().fromJson(json);
		}	else if(type == (FactoryProdEntity).toString()){
			return FactoryProdEntity().fromJson(json);
		}	else if(type == (AccOrderDataData).toString()){
			return AccOrderDataData().fromJson(json);
		}	else if(type == (CountEntity).toString()){
			return CountEntity().fromJson(json);
		}	else if(type == (FactoryAddressEntity).toString()){
			return FactoryAddressEntity().fromJson(json);
		}	else if(type == (AddrEntity).toString()){
			return AddrEntity().fromJson(json);
		}	else if(type == (AddrData).toString()){
			return AddrData().fromJson(json);
		}	else if(type == (FinancesJsonEntity).toString()){
			return FinancesJsonEntity().fromJson(json);
		}	else if(type == (AuditAccEntity).toString()){
			return AuditAccEntity().fromJson(json);
		}	else if(type == (ProdSpecificationsEntity).toString()){
			return ProdSpecificationsEntity().fromJson(json);
		}	else if(type == (ProdCategoryEntity).toString()){
			return ProdCategoryEntity().fromJson(json);
		}	
		return null;
	}

  //list is returned by type
	static M _getListChildType<M>(List data) {
		if(List<CityListEntity>() is M){
			return data.map<CityListEntity>((e) => CityListEntity().fromJson(e)).toList() as M;
		}	else if(List<CityListData>() is M){
			return data.map<CityListData>((e) => CityListData().fromJson(e)).toList() as M;
		}	else if(List<CityListDataData>() is M){
			return data.map<CityListDataData>((e) => CityListDataData().fromJson(e)).toList() as M;
		}	else if(List<PolicyEntity>() is M){
			return data.map<PolicyEntity>((e) => PolicyEntity().fromJson(e)).toList() as M;
		}	else if(List<PolicyData>() is M){
			return data.map<PolicyData>((e) => PolicyData().fromJson(e)).toList() as M;
		}	else if(List<ProdModelEntity>() is M){
			return data.map<ProdModelEntity>((e) => ProdModelEntity().fromJson(e)).toList() as M;
		}	else if(List<AreaListEntity>() is M){
			return data.map<AreaListEntity>((e) => AreaListEntity().fromJson(e)).toList() as M;
		}	else if(List<AreaListData>() is M){
			return data.map<AreaListData>((e) => AreaListData().fromJson(e)).toList() as M;
		}	else if(List<AreaListDataData>() is M){
			return data.map<AreaListDataData>((e) => AreaListDataData().fromJson(e)).toList() as M;
		}	else if(List<LeaveMsgEntity>() is M){
			return data.map<LeaveMsgEntity>((e) => LeaveMsgEntity().fromJson(e)).toList() as M;
		}	else if(List<LeaveMsgData>() is M){
			return data.map<LeaveMsgData>((e) => LeaveMsgData().fromJson(e)).toList() as M;
		}	else if(List<LeaveMsgDataData>() is M){
			return data.map<LeaveMsgDataData>((e) => LeaveMsgDataData().fromJson(e)).toList() as M;
		}	else if(List<OrderListEntity>() is M){
			return data.map<OrderListEntity>((e) => OrderListEntity().fromJson(e)).toList() as M;
		}	else if(List<OrderListOutputOrderAllRecordInfoDto>() is M){
			return data.map<OrderListOutputOrderAllRecordInfoDto>((e) => OrderListOutputOrderAllRecordInfoDto().fromJson(e)).toList() as M;
		}	else if(List<OrderListProdct>() is M){
			return data.map<OrderListProdct>((e) => OrderListProdct().fromJson(e)).toList() as M;
		}	else if(List<OrderRecordEntity>() is M){
			return data.map<OrderRecordEntity>((e) => OrderRecordEntity().fromJson(e)).toList() as M;
		}	else if(List<OrderRecordLeavemessageimgList>() is M){
			return data.map<OrderRecordLeavemessageimgList>((e) => OrderRecordLeavemessageimgList().fromJson(e)).toList() as M;
		}	else if(List<AddOrderEntity>() is M){
			return data.map<AddOrderEntity>((e) => AddOrderEntity().fromJson(e)).toList() as M;
		}	else if(List<AddOrderProd>() is M){
			return data.map<AddOrderProd>((e) => AddOrderProd().fromJson(e)).toList() as M;
		}	else if(List<AddOrderProdsPartsVal>() is M){
			return data.map<AddOrderProdsPartsVal>((e) => AddOrderProdsPartsVal().fromJson(e)).toList() as M;
		}	else if(List<RechargeRecordEntity>() is M){
			return data.map<RechargeRecordEntity>((e) => RechargeRecordEntity().fromJson(e)).toList() as M;
		}	else if(List<StatisticsEntity>() is M){
			return data.map<StatisticsEntity>((e) => StatisticsEntity().fromJson(e)).toList() as M;
		}	else if(List<PartEntity>() is M){
			return data.map<PartEntity>((e) => PartEntity().fromJson(e)).toList() as M;
		}	else if(List<UserinfoEntity>() is M){
			return data.map<UserinfoEntity>((e) => UserinfoEntity().fromJson(e)).toList() as M;
		}	else if(List<UserinfoData>() is M){
			return data.map<UserinfoData>((e) => UserinfoData().fromJson(e)).toList() as M;
		}	else if(List<UserinfoDataData>() is M){
			return data.map<UserinfoDataData>((e) => UserinfoDataData().fromJson(e)).toList() as M;
		}	else if(List<ProvinceListEntity>() is M){
			return data.map<ProvinceListEntity>((e) => ProvinceListEntity().fromJson(e)).toList() as M;
		}	else if(List<ProvinceListData>() is M){
			return data.map<ProvinceListData>((e) => ProvinceListData().fromJson(e)).toList() as M;
		}	else if(List<FinanceEntity>() is M){
			return data.map<FinanceEntity>((e) => FinanceEntity().fromJson(e)).toList() as M;
		}	else if(List<OrderDetailEntity>() is M){
			return data.map<OrderDetailEntity>((e) => OrderDetailEntity().fromJson(e)).toList() as M;
		}	else if(List<OrderDetailOrderProductModel>() is M){
			return data.map<OrderDetailOrderProductModel>((e) => OrderDetailOrderProductModel().fromJson(e)).toList() as M;
		}	else if(List<OrderDetailMasterInfo>() is M){
			return data.map<OrderDetailMasterInfo>((e) => OrderDetailMasterInfo().fromJson(e)).toList() as M;
		}	else if(List<FactoryBrandEntity>() is M){
			return data.map<FactoryBrandEntity>((e) => FactoryBrandEntity().fromJson(e)).toList() as M;
		}	else if(List<WxPayInfoEntity>() is M){
			return data.map<WxPayInfoEntity>((e) => WxPayInfoEntity().fromJson(e)).toList() as M;
		}	else if(List<WxPayInfoData>() is M){
			return data.map<WxPayInfoData>((e) => WxPayInfoData().fromJson(e)).toList() as M;
		}	else if(List<WxPayInfoDataItem2>() is M){
			return data.map<WxPayInfoDataItem2>((e) => WxPayInfoDataItem2().fromJson(e)).toList() as M;
		}	else if(List<BillSecEntity>() is M){
			return data.map<BillSecEntity>((e) => BillSecEntity().fromJson(e)).toList() as M;
		}	else if(List<FeeOrderEntity>() is M){
			return data.map<FeeOrderEntity>((e) => FeeOrderEntity().fromJson(e)).toList() as M;
		}	else if(List<AccDetailEntity>() is M){
			return data.map<AccDetailEntity>((e) => AccDetailEntity().fromJson(e)).toList() as M;
		}	else if(List<AccDetailAccessoryDate>() is M){
			return data.map<AccDetailAccessoryDate>((e) => AccDetailAccessoryDate().fromJson(e)).toList() as M;
		}	else if(List<AccDetailAccessory>() is M){
			return data.map<AccDetailAccessory>((e) => AccDetailAccessory().fromJson(e)).toList() as M;
		}	else if(List<AccDetailOrderProductList>() is M){
			return data.map<AccDetailOrderProductList>((e) => AccDetailOrderProductList().fromJson(e)).toList() as M;
		}	else if(List<AccDetailOrderProductListAccessoryData>() is M){
			return data.map<AccDetailOrderProductListAccessoryData>((e) => AccDetailOrderProductListAccessoryData().fromJson(e)).toList() as M;
		}	else if(List<FeeDetailEntity>() is M){
			return data.map<FeeDetailEntity>((e) => FeeDetailEntity().fromJson(e)).toList() as M;
		}	else if(List<FeeDetailFee>() is M){
			return data.map<FeeDetailFee>((e) => FeeDetailFee().fromJson(e)).toList() as M;
		}	else if(List<DistrictListEntity>() is M){
			return data.map<DistrictListEntity>((e) => DistrictListEntity().fromJson(e)).toList() as M;
		}	else if(List<DistrictListData>() is M){
			return data.map<DistrictListData>((e) => DistrictListData().fromJson(e)).toList() as M;
		}	else if(List<DistrictListDataData>() is M){
			return data.map<DistrictListDataData>((e) => DistrictListDataData().fromJson(e)).toList() as M;
		}	else if(List<DistinguishEntity>() is M){
			return data.map<DistinguishEntity>((e) => DistinguishEntity().fromJson(e)).toList() as M;
		}	else if(List<FactoryProdEntity>() is M){
			return data.map<FactoryProdEntity>((e) => FactoryProdEntity().fromJson(e)).toList() as M;
		}	else if(List<AccOrderDataData>() is M){
			return data.map<AccOrderDataData>((e) => AccOrderDataData().fromJson(e)).toList() as M;
		}	else if(List<CountEntity>() is M){
			return data.map<CountEntity>((e) => CountEntity().fromJson(e)).toList() as M;
		}	else if(List<FactoryAddressEntity>() is M){
			return data.map<FactoryAddressEntity>((e) => FactoryAddressEntity().fromJson(e)).toList() as M;
		}	else if(List<AddrEntity>() is M){
			return data.map<AddrEntity>((e) => AddrEntity().fromJson(e)).toList() as M;
		}	else if(List<AddrData>() is M){
			return data.map<AddrData>((e) => AddrData().fromJson(e)).toList() as M;
		}	else if(List<FinancesJsonEntity>() is M){
			return data.map<FinancesJsonEntity>((e) => FinancesJsonEntity().fromJson(e)).toList() as M;
		}	else if(List<AuditAccEntity>() is M){
			return data.map<AuditAccEntity>((e) => AuditAccEntity().fromJson(e)).toList() as M;
		}	else if(List<ProdSpecificationsEntity>() is M){
			return data.map<ProdSpecificationsEntity>((e) => ProdSpecificationsEntity().fromJson(e)).toList() as M;
		}	else if(List<ProdCategoryEntity>() is M){
			return data.map<ProdCategoryEntity>((e) => ProdCategoryEntity().fromJson(e)).toList() as M;
		}
		return null;
	}

  static M fromJsonAsT<M>(json) {
    if (json is List) {
      return _getListChildType<M>(json);
    } else {
      return _fromJsonSingle<M>(json) as M;
    }
  }
}